﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;

namespace Jungle.Code.DAL
{
	public class DBHelper
	{
		#region Fields
		private static string _connectionString = ConfigurationManager.ConnectionStrings["dbConnection"].ConnectionString;

		private static int _commandTimeout = 30;
		#endregion

		#region Properties
		public static string ConnectionString {
			get {
				return _connectionString;
			}
			set {
				_connectionString = value;
			}
		}
		
		public static int CommandTimeout {
			get {
				return _commandTimeout;
			}
			set {
				_commandTimeout = value;
			}
		}
		#endregion
		
		public static SqlConnection GetConnection() {
			SqlConnection conn = null;
			try {
				conn = new SqlConnection(ConnectionString);
			} catch (Exception) {
			}
			return conn;
		}


	}
}
